<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 1.5 将 短横的写法转小驼峰： border-right-color  borderRightColor
        let str = "border-right-color";
        function get_hump(str) {
            let strArr = str.split('-');
            for (let i = 1; i < strArr.length; i++) {
                // let t = strArr[i].charAt(0).toUpperCase() + strArr[i].slice(1);
                let t = strArr[i].charAt(0).toUpperCase() + strArr[i].slice(1);
                strArr[i] = t;    
            }
            return strArr.join("");
        }
       console.log( get_hump(str));
    </script>
</body>

</html>